<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
        <title>Document</title>
        <script>
            /* 
                1、编写函数has(arr , 60) 判断数组中是否存在60这个元素，返回布尔类型
            */
            function has(arr, item){
                for(var i = 0; i < arr.length; i++){
                    if(arr[i] === item){
                        return true;
                    }
                }
                return false;
            }

            alert(has([10, 20, 30], 20));
        </script>
    </head>
    <body>
        
    </body>
</html>